<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content ">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-content">
						<form class="form-horizontal m-t" id="signupForm">
						<input id="id" name="id" th:value="${wxShopCatAuditCategory.id}"  type="hidden">


							<div class="form-group">
								<label class="col-sm-3 control-label">营业执照或组织机构代码图：</label>
								<div class="col-sm-8">
									<div id="file_upload">
									</div>
									<div id="logo" style="padding: 5px;">
										<img th:src="${wxShopCatAuditCategory.license}" style='height: 60px;width: 60px'>
										<i class="fa fa-close" onclick="$('#license').val('');$('#logo').html('');"></i>

									</div>
									<input type="hidden" id="license" name="license" th:value="${wxShopCatAuditCategory.license}" >
								</div>
							</div>
							<!--<div class="form-group">
								<label class="col-sm-3 control-label">营业执照或组织机构代码证，图片url：</label>
								<div class="col-sm-8">
									<input id="license" name="license" th:value="${wxShopCatAuditCategory.license}" class="form-control" type="text">
								</div>
							</div>-->
														<!--<div class="form-group">
								<label class="col-sm-3 control-label">一级类目id：</label>
								<div class="col-sm-8">
									<input id="level1" name="level1" th:value="${wxShopCatAuditCategory.level1}" class="form-control" type="text">
								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">二级类目id：</label>
								<div class="col-sm-8">
									<input id="level2" name="level2" th:value="${wxShopCatAuditCategory.level2}" class="form-control" type="text">
								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">三级类目id：</label>
								<div class="col-sm-8">
									<input id="level3" name="level3" th:value="${wxShopCatAuditCategory.level3}" class="form-control" type="text">
								</div>
							</div>-->
							<div class="form-group">
								<label class="col-sm-3 control-label">所属类目：</label>
								<div class="col-sm-8">
									<input id="selectPage" name="level3" th:value="${wxShopCatAuditCategory.level3}" class="form-control" type="text">
								</div>
							</div>

							<div class="form-group">
								<label class="col-sm-3 control-label">资质材料图：</label>
								<div class="col-sm-8">
									<div id="file_upload_certificate">
									</div>
									<div id="logo_certificate" style="padding: 5px;">
										<img th:src="${wxShopCatAuditCategory.certificate}" style='height: 60px;width: 60px'>
										<i class="fa fa-close" onclick="$('#certificate').val('');$('#logo_certificate').html('');"></i>

									</div>
									<input type="hidden" id="certificate" name="certificate" th:value="${wxShopCatAuditCategory.license}" >
								</div>
							</div>
							<!--<div class="form-group">
								<label class="col-sm-3 control-label">资质材料：</label>
								<div class="col-sm-8">
									<input id="certificate" name="certificate" th:value="${wxShopCatAuditCategory.level3}" class="form-control" type="text">
								</div>
							</div>-->
													<!--	<div class="form-group">
								<label class="col-sm-3 control-label">创建时间：</label>
								<div class="col-sm-8">
									<input id="caAt" name="caAt" th:value="${wxShopCatAuditCategory.caAt}" class="form-control" type="text">
								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">修改时间：</label>
								<div class="col-sm-8">
									<input id="upAt" name="upAt" th:value="${wxShopCatAuditCategory.upAt}" class="form-control" type="text">
								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">0默认1删除：</label>
								<div class="col-sm-8">
									<input id="delFlag" name="delFlag" th:value="${wxShopCatAuditCategory.delFlag}" class="form-control" type="text">
								</div>
							</div>-->
																					<div class="form-group">
								<div class="col-sm-8 col-sm-offset-3">
									<button type="submit" class="btn btn-primary">提交</button>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
	</div>
	</div>
	<div th:include="include::footer"></div>
	<script type="text/javascript" src="/js/selectpage/selectpage.js"></script>
	<script type="text/javascript" src="/js/appjs/shop/wxShopCatAuditCategory/edit.js">
	</script>

	<script type="text/javascript">
		//定义数组，在服务端返回的数据也以该格式返回：Array[{Object},{...}]
		/* var tag_data = [
            {id:1 ,name:'Chicago Bulls',desc:'芝加哥公牛'},
            {id:2 ,name:'Cleveland Cavaliers',desc:'克里夫兰骑士'},
            {id:3 ,name:'Detroit Pistons',desc:'底特律活塞'},
            {id:4 ,name:'Indiana Pacers',desc:'印第安纳步行者'}
        ]; */
		//showField：设置下拉列表中显示文本的列
		//keyField：设置下拉列表项目中项目的KEY值，用于提交表单
		//data：数据源，可以是JSON数据格式，也可以是URL
		console.log("1111111111111");
		$('#selectPage').selectPage({
			showField : 'thirdCatName',
			searchField : 'thirdCatName',
			keyField : 'thirdCatId',
			//启用多选模式
			multiple : false,
			//限制最多选中10个项目
			maxSelectLimit : 10,
			//设置选中项目后不关闭列表
			selectToCloseList : false,
			// pageSize : 10,
			data : '/shop/wxShopCat/getCatList',
			params : function(){
				//console.log("pageSize:"+pageSize);
				//console.log("pageNumber :"+pageNumber);
				return {//'name':'aa','sex':1
				};
			},
			//ajax请求后服务端返回的数据格式处理
			//返回的数据里必须包含list（Array）和totalRow（number|string）两个节点
			eAjaxSuccess : function(d){
				var result;
				if(d) result = d.values.gridResult;
				else result = undefined;
				return result;
			}
		});
		console.log("22222222222");
		//获得选中项目的文本内容
		$('#func1').click(function(){
			alert($('#selectPage').selectPageText());
		});
		//清除所有选中的项目
		$('#func2').click(function(){
			$('#selectPage').selectPageClear();
		});
		//动态修改选中项目
		$('#func3').click(function(){
			$('#selectPage').val('20');
			$('#selectPage').selectPageRefresh();
		});
		//设置插件禁用 / 启用
		$('#funcDisabled').click(function(){
			if($('#selectPage').selectPageDisabled())//判断当前状态
				$('#selectPage').selectPageDisabled(false);
			else
				$('#selectPage').selectPageDisabled(true);
		});
	</script>
</body>
</html>
